import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 递归求 N 的阶乘
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-04-18  18:54
 */
public class Test5 {
    public static int fac(int n) {
        if(n == 1) {
            return 1;
        } else {
            return n * fac(n-1);
        }
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(fac(n));
        scanner.close();
    }
}
